feat: Extension framework firebase example#1090
feat: Extension framework firebase example#1090bryans99 wants to merge 1 commit intofeature/extension-dashboard-tilefrom
Conversation
And integration with Looker google workspace auth. Extension framework SDK updated to get google access token and to allow scopes to be reauthorized if necessary.
Typescript Tests0 files - 7 0 suites - 85 0s ⏱️ - 4m 49s Results for commit cb53e1b. ± Comparison against base commit 66e7013. This pull request removes 198 tests. |
jkaster
left a comment
There was a problem hiding this comment.
Got some README questions but looks good otherwise
| @@ -0,0 +1,94 @@ | |||
| # Looker Extension Firestore Demo (React & Typescript) | |||
|
|
|||
| TODO - add firebase setup | |||
|
|
||
| TODO - add firebase setup | ||
|
|
||
| This repository demonstrate using firestore in a Looker extension using Typescript. |
There was a problem hiding this comment.
| This repository demonstrate using firestore in a Looker extension using Typescript. | |
| This repository demonstrates using firestore in a Looker extension using Typescript. |
| } | ||
| ``` | ||
|
|
||
| 4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project— in this case, helloworld-js. |
There was a problem hiding this comment.
| 4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project— in this case, helloworld-js. | |
| 4. Create a `model` LookML file in your project. The name doesn't matter but the convention is to name it the same as the project — in this case, helloworld-js. |
|
|
||
| - Add a connection in this model. | ||
| - [Configure the model you created](https://docs.looker.com/data-modeling/getting-started/create-projects#configuring_a_model) so that it has access to the selected connection. | ||
| We do this because Looker permissions data access via models— In order to grant / limit access to an extension, it must be associated with a model. |
There was a problem hiding this comment.
Not sure what to do with the grammar here.
| * SOFTWARE. | ||
| */ | ||
| export const AnimalsList = () => { | ||
| const firestore = useFirestore() |
| const configure = async () => { | ||
| try { | ||
| const config = | ||
| (await extensionSDK.userAttributeGetItem('firebase_config')) || '' |
There was a problem hiding this comment.
Is this user attribute associated with the extension?
There was a problem hiding this comment.
Yes. You needs a config object for firebase apps that contains an api key. One option is to use env variables but then you tied to one application. The other option is user attribute. The config allows you load the application but you need a google credential to access the data.
And integration with Looker google workspace auth.
Extension framework SDK updated to get google access token and to allow
scopes to be reauthorized if necessary.